package com.tyl.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    // 对应数据库的主键id
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String age;
    private String email;

    @Version//乐观锁注解
    private Integer version;


    @TableLogic//逻辑删除
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)//插入是更新时
    private Date createTime;
    @TableField(fill =FieldFill.INSERT_UPDATE)//插入和更新时
    private Date updateTime;
}
